10 KEY OFF:SCREEN 1:COLOR 0,15:CLS:PI=3.141592654
20 X=5:Y=25:A=25:B=5:W=50:H=50:GOSUB 100
30 X=80:Y=10:W=60:H=65:A=10:GOSUB 200
40 X=148:Y=10:W=60:H=60:A=20:GOSUB 250
50 X=215:Y=5:A=100:GOSUB 500
60 X=5:Y=95:A=80:GOSUB 400
70 X=140:Y=140:A=34:GOSUB 300
80 X=200:Y=130:A=230:B=115:W=80:H=50:GOSUB 100
98 WHILE INPUT$(1)="":WEND:CLS
99 SCREEN 0:WIDTH 80:CLS:END
100 LINE (X,Y)-(X+W,Y+H),,B
110 LINE (X,Y)-(A,B):LINE -(A+W,B)
120 LINE -(A+W,B+H):LINE -(X+W,Y+H)
130 LINE (A+W,B)-(X+W,Y)
140 LINE (A,B)-(A,B+H),,,&H6666
150 LINE -(A+W,B+H),,,&H6666
160 LINE (A,B+H)-(X,Y+H),,,&H6666
170 RETURN
200 CIRCLE (X+W/2,Y),W/2,,,,A/W
210 LINE (X,Y)-(X,Y+H):LINE (X+W,Y)-(X+W,Y+H)
220 CIRCLE (X+W/2,Y+H),W/2,,PI,PI*2,A/W
230 RETURN
250 LINE (X,Y+H)-(X+W/2,Y):LINE -(X+W,Y+H)
260 CIRCLE (X+W/2,Y+H),W/2,,PI,PI*2,A/W
270 RETURN
300 CIRCLE (X,Y),A*SQR(2),,,,1
310 CIRCLE (X,Y-A),A,,PI,PI*2,1
320 CIRCLE (X+A,Y),A,,PI/2,PI*1.5,1
330 CIRCLE (X,Y+A),A,,PI*2,PI,1
340 CIRCLE (X-A,Y),A,,PI*1.5,PI/2,1
350 RETURN
400 CIRCLE (X+A/2,Y),A/2,,-PI,-PI*2,1
410 CIRCLE (X+A,Y+A/2),A/2,,-PI/2,-PI*1.5,1
420 CIRCLE (X+A/2,Y+A),A/2,,-PI*2,-PI,1
430 CIRCLE (X,Y+A/2),A/2,,-PI*1.5,-PI/2,1
440 RETURN
500 PHI=(SQR(5)-1)/2:K=PHI/SQR(2)
510 M=45/180*PI-ATN(K/SQR(-K*K+1))
520 D=A*COS(M)*SIN(M):E=A*COS(M)*COS(M)
530 LINE (X,Y)-(X+A,Y+A),,B
540 LINE (X,Y)-(X+D,Y+E)
550 LINE (X,Y+A)-(X+E,Y+A-D)
560 LINE (X+A,Y+A)-(X+A-D,Y+A-E)
570 LINE (X+A,Y)-(X+A-E,Y+D)
580 RETURN

